package com.sk.bilibili.utils;

/**
 * @author 邵康
 * @date 2021/12/19 13:26
 */
public class StringUtils {

    public static String upperFirst(String name){
        return name.substring(0,1).toUpperCase()+name.substring(1);
    }

    public static String toUnderline(String name){
        String res = name.replaceAll("[A-Z]", "_$0").toLowerCase();
        if(!res.startsWith("_"))return res;
        return res.substring(1);
    }

}
